[#ftl]

[#if args.view??]

	[#assign view = args.view]

[#else]

	[#assign view = 'list']

[/#if]

[#if s?? && s.error??]
        <div class="results">${s.error}</div>
[#else]

	[#if s?? && s.node??]

		[#import "/org/alfresco/confluence/util/cmis.utils.ftl" as cmisutils]

		[@cmisutils.docview s.node view endpoint endpointurl/]

	[#else]
		   [#if s?? && s.error??]
				  <div class="results">${s.error}</div>
		   [#else]
				  <div class="results"><i>No results found</i></div>
		   [/#if]
	[/#if]

[/#if]